<?php
//QQ1147361223提供技术驱动

namespace app\admin\controller;
use think\facade\View;

use think\facade\Request;
use think\facade\Env;
use think\facade\Db;
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\IOFactory;
use think\facade\Session;

class Leads extends Common
{
    public $model;
    public function initialize(){
        parent::initialize();
        $this->model=\think\facade\Db::name('crm_customer');
    }
    public function get($id)
    {
        if ($this->request->isPost()) {
            $row=$this->model->where('id','=',$id)->find();
            if($row){
                $msg = ['code' => 0, 'msg' => '数据获取成功！', 'data' => $row];
            }else{
                $msg = ['code' => -200, 'msg' => '数据获取s失败！'];
            }

            return json($msg);
        }
    }
}
